﻿Imports DTO
Imports System.Data.SqlClient

Public Class HinhThucTTDAO

    Shared Function layDsHinhThucTT() As List(Of DTO.HinhThucTTDTO)
        Dim dsHinhThucTT As New List(Of HinhThucTTDTO)
        Dim cn As SqlConnection = CKetNoi.Connect
        Dim cmd As New SqlCommand
        cmd.Connection = cn
        cmd.CommandType = CommandType.StoredProcedure
        cmd.CommandText = "usp_layHinhThucTT"
        cn.Open()
        Dim reader As SqlDataReader = cmd.ExecuteReader
        While reader.Read
            Dim tt As New HinhThucTTDTO
            tt.MaThanhToan = reader("MaThanhToan")
            tt.TenThanhToan = reader("TenThanhToan")
            dsHinhThucTT.Add(tt)
        End While
        cn.Close()
        Return dsHinhThucTT
    End Function

End Class
